/*
 * @Description: 档案备份计划 功能操作组件
 * @Author: Rfan
 * @Date: 2022-08-03 20:29:15
 * @LastEditTime: 2022-08-04 17:15:52
 */

import { useMemo, useState } from 'react';
import { Button, Divider, Space } from 'antd';
import AddTransferForm from './dialogs/AddTransferForm';

const PageOperate = () => {
  const [tFormVisible, setTFormVisible] = useState(false);

  return (
    <div className="filter-container">
      <p className="page-title">备份清单列表</p>
      <Space size="small">
        <Button
          onClick={() => {
            setTFormVisible(true);
          }}
        >
          创建计划
        </Button>
        <Button>创建移交申请单</Button>
        <Button>导出计划</Button>
        <Button>导入计划</Button>
        <Divider type="vertical" />
        <Button>筛选</Button>
      </Space>
      {useMemo(
        () => (
          <AddTransferForm
            visible={tFormVisible}
            onClose={() => {
              setTFormVisible(false);
            }}
          />
        ),
        [tFormVisible]
      )}
    </div>
  );
};

export default PageOperate;
